package com.xxxx.server.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.xxxx.server.mapper.TestMapper;
import com.xxxx.server.pojo.Student;
import com.xxxx.server.service.TestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @program: yeb
 * @description: 测试service
 * @author: Honors
 * @create: 2021-08-28 10:46
 */
@Service
public class TestServiceImpl extends ServiceImpl<TestMapper, Student> implements TestService {
    @Autowired
    TestMapper testMapper;

    /**
     * 添加测试学生
     *
     * @param student
     * @return
     */
    public void add(Student student) {

        System.out.println("添加前：" + student.getStuId());
        testMapper.addStudent(student);
        System.out.println("添加后：" + student.getStuId());

    }

    /**
     * 查询测试学生
     *
     * @param id
     * @return
     */
    public Student selectStudent(Long id) {

        return testMapper.selectStudent(id);
    }
}
